<template>
	<view class="cardstyle">
	<text class="titlebox">{{title}}</text>
	<view class="tipbox">
		<text style="color: #f00;" v-if="isTop">置顶</text>
		<text>{{author}}</text>
		<text>{{comments}}评</text>
		<view style="flex:1;display: flex;justify-content: flex-end;">
			<text>{{time}}</text>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		name:"cardViewText",
		data() {
			return {
				}
			},
			props:{
					title:{
						type:String,
						default:"新闻标题",
						require:true
					},
					isTop:{
						type:Boolean,
						default:false,
						require:true
					},
					author:{
						type:String,
						default:"来源",
						require:true
					},
					comments:{
						type:Number,
						default:0,
						require:true
					},
					time:{
						type:String,
						default:"2025.1.1"
					}
		
		}
	}
</script>

<style>
	.cardstyle {
	  padding: 10px;
	  margin-bottom: 5px;
	  border-radius: 4px;
	  background-color: #e6f7ff;
	}
	.titlebox {
	  font-size: 16px;
	  display: block;
	  margin-bottom: 5px;
	}
	.tipbox {
	  display: flex;
	  font-size: 12px;
	  color: #666;
	}
	.tipbox text {
	  margin-right: 10px;
	}
	.time {
	  flex: 1;
	  text-align: right;
	  margin-right: 0;
	}
	

</style>